//
//  ExampleCell.m
//  NekaPrice
//
//  Created by yu on 2018/6/22.
//  Copyright © 2018年 ma c. All rights reserved.
//

#import "ExampleCell.h"

@implementation ExampleCell




- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        _imgView = [[UIImageView alloc] init];
        
        
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont systemFontOfSize:12];
        self.titleLabel.numberOfLines = 2;
        
        
        [self.contentView addSubview:_imgView];
        [self.contentView addSubview:_titleLabel];
        
        [_imgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.bottom.mas_equalTo(-40);
        }];
        
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.imgView.mas_bottom).offset(0);
            make.left.right.bottom.mas_equalTo(0);
        }];
        
    }
    return self;
}

- (void)setModel:(ExampleModel *)model {
    
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:FormURL(model.litpic)] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    self.titleLabel.text = model.title;
    NSLog(@"%@", model.title);
}





@end
